<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
        let person={
            _name:'jack ma',
            _age:55,
            get name(){
                return this._name.replace('ma','**');
            },
            get age(){
                return this._age;
            },
            set age(val){
                if(val>100){
                    alert('age不能>100');
                }else{
                    this._age=val;
                }
            }
        };    

        console.log(person.name);
        person.age=101;
        console.log(person.age);
    </script>
</body>
</html>